



import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;
import java.awt.*;
public class dialogo { 
    public static void main( String ... args ) {
        final JFrame main = new JFrame();
        main.add( new JLabel("Hola" ) , BorderLayout.NORTH );
        main.add( new JButton("Click"){{
            addActionListener( new ActionListener() {
                public void actionPerformed( ActionEvent e ) {
                    JDialog d = new JDialog( main, true );
                    d.add( new JLabel("Dadaaaa") );
                    d.setVisible ( true );
                }
            });
        }});
        main.pack();
        main.setVisible( true );
    }
}

	
	
	
	

